#ifndef __MYCONFIG_H__
#define __MYCONFIG_H__
#include <stdio.h>
#include <string.h>

/**
 * @brief 中心设备状态枚举
 * 表示设备的运行状态，用于状态机管理
 */
enum state {
    UNKNOW,
    SLEEP,    
    CONNECTING,
    READY,
    RUNNING
};


#define SERVER_IP_ADDR "c5291326ae.iotda-device.cn-south-4.myhuaweicloud.com" // 接入地址
#define SERVER_IP_PORT 8883                                                       // 端口号
#define CLIENT_ID "my_central_0_0_2025050903"                                        // 设备id

#define MQTT_CMDTOPIC_SUB "$oc/devices/my_central/sys/commands/#" // 平台下发命令

#define MQTT_DATATOPIC_PUB "$oc/devices/my_central/sys/properties/report"                 // 属性上报topic
#define MQTT_CLIENT_RESPONSE "$oc/devices/my_central/sys/commands/response/request_id=%s" // 命令响应topic

#define DATA_SEVER_NAME "Switch"
#define DATA_ATTR_NAME "stat"
#define MQTT_DATA_SEND "{\"services\": [{\"service_id\": \"%s\",\"properties\": {\"id\": %d ,\"hum\": %s ,\"tem\": %s ,\"light\": %s,\"soil\": %s,\"rain\": %s,\"uv\": %s,\"ph\": %s }}]}" // 上报数据格式
#define MQTT_STAT_SEND "{\"services\": [{\"service_id\": \"%s\",\"properties\": {\"id\": %d ,\"led\": %s ,\"water\": %s ,\"fan\": %s,\"stat\": %s}}]}" // 上报状态格式

#define KEEP_ALIVE_INTERVAL 120
#define DELAY_TIME_MS 200




#endif